# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=bluefish
pkgver=2.2.14
pkgrel=1
pkgdesc='A powerful HTML editor for experienced web designers and programmers'
arch=('loong64' 'x86_64')
url='http://bluefish.openoffice.nl/'
license=('GPL3')
depends=('gtk3' 'enchant' 'python')
makedepends=('gucharmap' 'intltool')
optdepends=('gucharmap: for using the charmap plugin')
install=$pkgname.install
source=("https://www.bennewitz.com/$pkgname/stable/source/$pkgname-$pkgver.tar.bz2"{,.sig})
validpgpkeys=(64979277BAFF2D4CB637AC3B291C63A6B78DFBA1) # Olivier Sessink <olivier@bluefish.openoffice.nl>
sha512sums=('4f82693e9d16bbc3ecdbb3e9ace22c433eae1779fbccc14aac53d05e449fad9e72b0e42dc1b60863b44130778741b3a683040a7311ec7f2958ec394bc7897dde'
            'SKIP')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -vif
}

build() {
  cd $pkgname-$pkgver

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --enable-spell-check \
    --disable-update-databases \
    --disable-xml-catalog-update

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir" install
}
